package com.easy.west.westclient.api.hotvod.api;

import android.content.Context;
import android.support.annotation.NonNull;

import com.easy.west.westclient.api.base.callback.BaseCallBack;
import com.easy.west.westclient.api.base.impl.BaseImpl;
import com.easy.west.westclient.api.hotvod.bean.VodList;
import com.easy.west.westclient.api.hotvod.event.GetHotVodListEvent;
import com.easy.west.westclient.api.hotvod.event.GetVodOrLiveEvent;
import com.easy.west.westclient.util.UUIDGenerator;

public class HotVodImpl extends BaseImpl<HotVodService> implements HotVodApi {

    public HotVodImpl(@NonNull Context context) {
        super(context);
    }

    /**
     * 注释见接口
     * @return
     */
    @Override
    public String getHotVod() {
        String uuid = UUIDGenerator.getUUID();
        service.getHotVodList().enqueue(new BaseCallBack<VodList>(new GetHotVodListEvent(uuid)));
        return uuid;
    }

    @Override
    public String getHotOrLiveNow() {
        String uuid = UUIDGenerator.getUUID();
        service.getVodOrLive().enqueue(new BaseCallBack<>(new GetVodOrLiveEvent(uuid)));
        return uuid;
    }
}
